/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	hey 
 * 
 * <p>描   述  :   ReportChannels.java for com.pengtu.gsj.entity.lzgl    </p>
 * 
 * <p>最后修改 : $: Sep 12, 2017-10:17:38 AM v 1.0.0	 hey   $ </p>
 * 
*/

package com.pengtu.gsj.entity.lzgl;


import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;


/**
 * 
 * ReportChannels
 * 
 * Sep 12, 2017 10:17:38 AM
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name="T_LZ_REPORTCHANNELS")
public class ReportChannels  extends IdEntity{

	private static final long serialVersionUID = 9064552072372848992L;
	
	private String complaintTime;				//投诉时间
	private String complaintThings;				//投诉事件
	private String isReply;						//是否予以答复
	private String complaintContent;			//投诉内容
	private String remark;
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	public ReportChannels(){
		
	}
	
	public ReportChannels(String id, String complaintThings){
		this.id = id;
		this.complaintThings = complaintThings;
	}
	
	
	@Column(name = "COMPLAINTTIME")
	public String getComplaintTime() {
		return complaintTime;
	}
	public void setComplaintTime(String complaintTime) {
		this.complaintTime = complaintTime;
	}
	@Column(name = "COMPLAINTTHINGS")
	public String getComplaintThings() {
		return complaintThings;
	}
	public void setComplaintThings(String complaintThings) {
		this.complaintThings = complaintThings;
	}
	@Column(name = "ISREPLY")
	public String getIsReply() {
		return isReply;
	}
	public void setIsReply(String isReply) {
		this.isReply = isReply;
	}
	@Column(name = "COMPLAINTCONTENT")
	public String getComplaintContent() {
		return complaintContent;
	}
	public void setComplaintContent(String complaintContent) {
		this.complaintContent = complaintContent;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
}
